package xin.baizhiedu.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;

/**
 *核料工单
 * SELECT
 * 	A.JOB_CODE,
 * 	A.STUT_STATENAME,
 * 	A.MATE_CODE,
 * 	A.JOB_EQNAME,
 * 	A.PLAN_NUM,
 * 	A.RECIVE_NUM,
 * CASE
 *
 * 		WHEN A.RECIVE_TYPE = 'Y' THEN
 * 		1 ELSE 2
 * 	END "RECIVE_TYPE",
 * 	( A.PLAN_NUM - A.RECIVE_NUM ) LAST_NUM
 * FROM
 * 	(
 * 	SELECT
 * 		B.JOB_CODE,
 * 		B.STUT_STATENAME,
 * 		A.MATE_CODE,
 * 		A.JOB_EQNAME,
 * 		C.RECIVE_TYPE,
 * 	CASE
 *
 * 			WHEN C.PLAN_NUM IS NULL THEN
 * 			0 ELSE C.PLAN_NUM
 * 		END "PLAN_NUM",
 * CASE
 *
 * 	WHEN C.RECIVE_NUM IS NULL THEN
 * 	0 ELSE C.RECIVE_NUM
 * 	END "RECIVE_NUM"
 * FROM
 * 	(
 * 	SELECT
 * 		job_id,
 * 		JOB_CODE,
 * 		STUT_STATENAME
 * 	FROM
 * 		T_PLAN_JOB
 * 	WHERE
 * 		JOB_TYPENAME = '订单'
 * 		AND JOB_DIVISION = '1'
 * 		AND ( STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.014' OR STUT_STATECODE = 'PLAN.t_plan_Job.STUT_StateCode.018' )
 * 	) B,
 * 	T_PLAN_JOB A
 * 	LEFT JOIN ( SELECT JOB_ID, PLAN_NUM, RECIVE_NUM, RECIVE_TYPE FROM T_PLAN_MATERIAL_REQUIRMENT ) C ON A.JOB_ID = C.JOB_ID
 * WHERE
 * 	A.JOB_PID = B.JOB_ID
 * ORDER BY
 * 	B.JOB_CODE
 * 	) A
 * WHERE
 * 	A.PLAN_NUM != 0
 */
@Data
@TableName(value = "QG_JOB_NUCLEAR_MATERIAL", autoResultMap = true)
public class qgJobNuclearMaterial implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 工单号
     */
    @TableField(value = "JOB_CODE")
    private String jobCode;

    /**
     * 工单号状态
     */
    @TableField(value = "STUT_STATENAME")
    private String stutStateName;

    /**
     * 物料号
     */
    @TableField(value = "MATE_CODE")
    private String mateCode;

    /**
     * 设备工位
     */
    @TableField(value = "JOB_EQNAME")
    private String jobEqname;

    /**
     * 计划数量
     */
    @TableField(value = "PLAN_NUM")
    private Long planNum;

    /**
     * 核料数量
     */
    @TableField(value = "RECIVE_NUM")
    private Long reciveNum;

    /**
     * 待核数量
     */
    @TableField(value = "LAST_NUM")
    private Long lastNum;

    /**
     * 状态
     */
    @TableField(value = "RECIVE_TYPE")
    private Long reciveType;
}
